package com.fd.cloud.fdftp.model;

import lombok.Data;
import org.apache.commons.net.ftp.FTP;
import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Data
@Component
@PropertySource("classpath:ftp.properties")
@ConfigurationProperties(prefix = "ftp")
public class FtpConfigOptions extends GenericObjectPoolConfig {
    /**
     * 地址
     */
    private String host;
    /**
     * 端口号
     */
    private int port=21;
    /**
     * 用户名
     */
    private String username;
    /**
     * Miami
     */
    private String password;
    /**
     * 方式
     */
    private int passiveMode = FTP.BINARY_FILE_TYPE;
    /**
     * 编码方式
     */
    private String encoding="UTF-8";
    /**
     * 超时时间
     */
    private int clientTimeout=120000;
    /**
     * 缓冲区
     */
    private int bufferSize =1024;


}
